cmake_minimum_required(VERSION 3.10)

project(MachineDict VERSION 1.0)


add_library(sqlite3 STATIC
        "sqlite3.h"
        "sqlite3.c"
        )

set(LIB_SRC
        "mdict.h"
        "mdict.cpp"
        )

add_library(mdict SHARED
        ${LIB_SRC}
        )

message(STATUS ${PROJECT_BINARY_DIR})

target_link_libraries(mdict PUBLIC sqlite3)

set(
    INC_DIR
    "C:/CCompiler/GTest/googletest/include"
    )

set(
    LINK_DIR
    "C:/CCompiler/GTest/lib"
    )

link_directories(${LINK_DIR})

add_executable(MachineDictTest test_cases.cpp)
target_include_directories(MachineDictTest PUBLIC ${INC_DIR} ${PROJECT_SOURCE_DIR})
target_link_libraries(MachineDictTest PUBLIC gtest) # 两个库需要同时链接
target_link_libraries(MachineDictTest PUBLIC mdict) # 链接写好的字典库
